#import "ALVersionView.h"



#pragma mark Constants


#pragma mark -
#pragma mark Class Globals

static NSGradient *ALVersionBackgroundGradient;


#pragma mark -
@interface ALVersionView (ALsectionViewPrivateMethods)

@end


#pragma mark -
@implementation ALVersionView

@synthesize bottomBorderColor;
@synthesize headerHeight;

+(void)initialize {
	NSColor *topColor = [NSColor colorWithCalibratedWhite:0.950 alpha:1.000];
	NSColor *bottomColor = [NSColor colorWithCalibratedWhite:0.900 alpha:1.000];
	ALVersionBackgroundGradient = [[NSGradient alloc] initWithStartingColor:topColor endingColor:bottomColor];
}

-(void)drawRect:(NSRect)dirtyRect {
	NSRect headerRect = [self bounds];
//	headerRect.origin.y = headerRect.size.height - [self headerHeight];
//	headerRect.size.height = [self headerHeight];
//	NSBezierPath *headerPath = [NSBezierPath bezierPathWithRect:headerRect];
//	[ALVersionBackgroundGradient drawInBezierPath:headerPath angle:270.0f];
	[ALVersionBackgroundGradient drawInRect:headerRect angle:270.0f];
    
	CGFloat minx = NSMinX(headerRect);
	CGFloat maxx = NSMaxX(headerRect);
	CGFloat miny = NSMinY(headerRect) + 0.5f;
	[[self bottomBorderColor] setStroke];
	[NSBezierPath strokeLineFromPoint:NSMakePoint(minx, miny) toPoint:NSMakePoint(maxx, miny)];
}

@end
